<?php
namespace app\index\controller;



use think\Controller;

use app\index\model\User;

class Index extends Controller
{
    public function index()
    {
        return $this->fetch();
    }
    public function phone()
    {
            
           
    }

    //邮箱注册
    public function mail()
    {
        $email = new User();
        $res = $email->email();
        
        if ( !$res ) {
            $this -> error('注册失败');
        } else {
            $this -> success('已提交,请激活邮箱','Index/home');
        }       
        
    }

    //邮箱注册激活
    public function checkMail(){
        
        $email = new User();
        $res = $email->checkEmail();
    }

    //首页
    public function home()
    {
        echo '这是首页';
    }
}
